\section{Android application's installation guide}
\label{androidInstallationGuide}
This documents explains how to install the mobile application in a emulator and in eclipse for continue developing the
application. 


\subsection{Install to execute in a emulator}


\begin{itemize}

 \item Download sdk from \emph{http://developer.android.com/sdk/index.html}.
 \item Extract the file.
 \item Execute \emph{./android-sdk-linux\_x86/tools/android} 
 \item Go to \emph{Available packages}. 
 \item Select \emph{Third party add-ons $\rightarrow$ Google APIs by Google Inc., 
Android API 8, revision 2.}

 \item Accept all the packages. Be carefull because by default this package appears unselected!!.
 \item Install.
 \item Select Virtual Devices.
 \item Click New.
 \item Selects a name for the AVD (PhoneName).
 \item Selects Google APIs (Google Inc.) API-level 8 in Target.
 \item Click Create AVD.
 \item Now you can run the phone \emph{./android-sdk-linux\_x86/tools/emulator -avd (PhoneName) \&}, where (PhoneName) its the name 
  of the AVD.
 \item Install the application \emph{./android-sdk-linux\_x86/platform-tools/adb install fflocation.apk}
 \item YOU CAN RUN THE APPLICATION with nick example and password example.
\end{itemize}


\subsection{Install to develope in Eclipse}

\begin{itemize}
 \item Install the Eclipse IDE. You have to download in the next site 
\newline http://www.eclipse.org/downloads/ and install it. The installation
 depends on the operation system that you have, but it is very easy anyway so we are not going to explain how to install.  

\item Once you have Eclipse installed in your computer you need to install the ADT Plugin.

\begin{enumerate}
 \item Start Eclipse, then select Help $\rightarrow$ Install New Software...
  \item Click Add, in the top-right corner.
  \item In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
  https://dl-ssl.google.com/android/eclipse/
  \item In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  \item In the next window, you'll see a list of the tools to be downloaded. Click Next.
  \item Accept the license agreements, then click Finish.
  \item When the installation completes, restart Eclipse

\end{enumerate}

\item Now we need to install the correct SDK.
\begin{enumerate}
 \item Select Window $\rightarrow$ Android SDK and AVD Manager.
 \item Select Available packages.
 \item Select the Android Repository and expand the line Third party Add-ons in order to select Google APIs 2.2 API level 8.
 \item Press Install Selected
\end{enumerate}

Install the emulator (Android Virtual Machine).
\begin{enumerate}
 \item Select Window $\rightarrow$ Android SDK and AVD Manager.
 \item Select Virtual Devices.
 \item Click New.
 \item Selects a name for the AVD.
 \item Selects Google APIs (Google Inc.) API-level 8 in Target.
 \item Click Create AVD.
\end{enumerate}


\item Open our application.
\begin{enumerate}
 \item Select Select $\rightarrow$ Import.
 \item Find General  $\rightarrow$ Existing projects into Workspace.
 \item Search the project and click Finish.
\end{enumerate}


\item Select the correct Project Build Target for the project.
\begin{enumerate}
 \item Select Project $\rightarrow$ Properties.
 \item Select Android in the list.
 \item In Project Build Target selects the checkbox Google APIs 2.2 API level 8.
 \item Click OK. 
\end{enumerate}

\item Modify the server's IP: You have to put the correct server's ip in the file \emph{/res/values/setup.xml}. As example if you 
want to put the IP 192.168.2.3 you must write \emph{\textless string name="IP"\textgreater192.168.2.3\textless/string\textgreater}. 

\item Because MapView gives you access to Google Maps data, you need to register with the Google Maps service and agree to the
 applicable Terms of Service before your MapView will be able to obtain data from Google Maps. To register you need to do:
\begin{enumerate}
\item Open a terminal if you are in linux or mac and write: \emph{keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore 
-storepass android -keypass android}. This command creates an MD5 key as \emph{A6:5B:9A:F2:91:A3:9D:A5:D8:8C:A6:6B:40:E7:61:7E}. 
\item Then you need go to 
\newline 
\emph{http://code.google.com/android/maps-api-signup.html} and sign up to obtain a key like 
\emph{"0bDHzVGT2mazIcJ..."}. 
\item Now you need to put this key in \emph{com.map.MapViewer} in the constructor:
\newline \emph{mapView = new MapView(getContext(), "0bDHzVGT2mazIcJ...");}

\end{enumerate}


\item YOU CAN RUN THE APPLICATION with nick example and password example.
\end{itemize}





